//
//  XMGuideViewController.m
//  XMKit
//
//  Created by chenming on 2018/5/26.
//  Copyright © 2018年 ChenXiaoMing. All rights reserved.
//

#import "XMGuideViewController.h"

// View
#import "XMAdvertisementView.h"

#import "XMAnimationGuideView.h"

@interface XMGuideViewController ()

@property (nonatomic, strong) XMAdvertisementView *advertisementView;

@property (nonatomic, strong) XMAnimationGuideView *animationGuideView;

@end

@implementation XMGuideViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor whiteColor];
    
    [self.advertisementView show];    
    
//    [self.animationGuideView show];
}

- (XMAnimationGuideView *)animationGuideView {
    if (!_animationGuideView) {
        _animationGuideView = [[XMAnimationGuideView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    }
    return _animationGuideView;
}

- (XMAdvertisementView *)advertisementView {
    if (!_advertisementView) {
        _advertisementView = [[XMAdvertisementView alloc] initWithFrame:[UIScreen mainScreen].bounds];
        __weak typeof(self) weakSelf = self;
        _advertisementView.pushBlock = ^{
            [weakSelf.advertisementView removeFromSuperview];
            weakSelf.advertisementView = nil;
        };
    }
    return _advertisementView;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
